<?php

class Back_Form_Config extends Jnd_Form
{

    private $_configs = array();

    private $_champEditable = array(
            "valeur"
    );

    public function __construct ($decorateur = "Formulairejndpro", $options = null)
    {
        parent::__construct($decorateur, $options);
        $this->setElementDecorators(
                array(
                        "$decorateur"
                ), array(), false);
    }

    public function init ()
    
    {
        $this->setAction('/back/config/editer');
        $this->setName("config");
        $this->setMethod("post");
        $this->addAttribs(
                array(
                        "class" => "cssform"
                ));
        
        $champ = new Zend_Form_Element_Hidden("id");
        $champs[] = $champ;
        
        $champ = new Jnd_Form_Element_HiddenDisplay("nom");
        $champ->setLabel(__("Nom"));
        $champ->setAttribs(
                array(
                        "readonly" => "readonly"
                ));
        $champs[] = $champ;
        
        $champ = new Zend_Form_Element_Text("valeur");
        $champ->setLabel(__("Valeur"));
        $champ->addValidator(
                new Zend_Validate_StringLength(array(
                        "min" => 0,
                        "max" => 255
                )));
        $champs[] = $champ;
        
        $champ = new Jnd_Form_Element_HiddenDisplay("description");
        $champ->setLabel(__("Description"));
        $champs[] = $champ;
        
        $this->addElements($champs);
    }
}

